<?php
include_once('common/header.php');
if($AppUI->id <=0 || ($AppUI->id > 0 && $AppUI->type < 2)) {
	$this->_redirect(HOST_BACKEND);
}
$arrParam	= $objRequest->getParams();
if(is_array($arrParam['variable'])) {
	$strFile = CONFIG_FOLDER . 'variable.json';
	if(file_exists($strFile)) {
		@unlink($strFile);
	}
	$strJson	= Zend_Json::encode($arrParam['variable']);	
	@file_put_contents($strFile, $strJson);	
}
$this->_redirect(HOST_BACKEND . 'setting/index');
exit();